/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { BaseResponse_Company_ } from '../models/BaseResponse_Company_';
import type { BaseResponse_Page_Company_ } from '../models/BaseResponse_Page_Company_';
import type { BaseResponse_Page_CompanyVO_ } from '../models/BaseResponse_Page_CompanyVO_';
import type { BaseResponse_string_ } from '../models/BaseResponse_string_';
import type { CompanyQueryRequest } from '../models/CompanyQueryRequest';
import type { CompanyUpdateRequest } from '../models/CompanyUpdateRequest';
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
export class CompanyControllerService {
    /**
     * add
     * @param address address
     * @param email email
     * @param file file
     * @param name name
     * @param phone phone
     * @param type type
     * @returns BaseResponse_string_ OK
     * @returns any Created
     * @throws ApiError
     */
    public static addUsingPost1(
        address: string,
        email: string,
        file: Blob,
        name: string,
        phone: string,
        type: string,
    ): CancelablePromise<BaseResponse_string_ | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/company/add',
            query: {
                'address': address,
                'email': email,
                'name': name,
                'phone': phone,
                'type': type,
            },
            formData: {
                'file': file,
            },
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }
    /**
     * getById
     * @param id id
     * @returns BaseResponse_Company_ OK
     * @returns any Created
     * @throws ApiError
     */
    public static getByIdUsingPost(
        id?: string,
    ): CancelablePromise<BaseResponse_Company_ | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/company/getById',
            query: {
                'id': id,
            },
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }
    /**
     * listCompanyPage
     * @param companyQueryRequest companyQueryRequest
     * @returns BaseResponse_Page_Company_ OK
     * @returns any Created
     * @throws ApiError
     */
    public static listCompanyPageUsingPost(
        companyQueryRequest: CompanyQueryRequest,
    ): CancelablePromise<BaseResponse_Page_Company_ | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/company/list/page',
            body: companyQueryRequest,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }
    /**
     * listCompanyPageVO
     * @param companyQueryRequest companyQueryRequest
     * @returns BaseResponse_Page_CompanyVO_ OK
     * @returns any Created
     * @throws ApiError
     */
    public static listCompanyPageVoUsingPost(
        companyQueryRequest: CompanyQueryRequest,
    ): CancelablePromise<BaseResponse_Page_CompanyVO_ | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/company/list/page/vo',
            body: companyQueryRequest,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }
    /**
     * update
     * @param companyUpdateRequest companyUpdateRequest
     * @returns BaseResponse_string_ OK
     * @returns any Created
     * @throws ApiError
     */
    public static updateUsingPut(
        companyUpdateRequest: CompanyUpdateRequest,
    ): CancelablePromise<BaseResponse_string_ | any> {
        return __request(OpenAPI, {
            method: 'PUT',
            url: '/company/update',
            body: companyUpdateRequest,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }
}
